package cn.cxion.chat.app.util;

import android.content.Context;
import android.widget.AutoCompleteTextView;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

import cn.cxion.chat.app.activity.DialogActivity;
import cn.cxion.chat.app.bean.AppointmentInfo;

/**
 * Created by 13799 on 2018/6/14.
 */

public class CheckUtil {
    public static boolean checkEditText(Context context, String msg, EditText editText) {
        if (StringUtil.isEmpty(editText.getText().toString())) {
            DialogHelp.showAlert(context, msg);
            return false;
        }
        return true;
    } public static boolean checkEditText(Context context, String msg, TextView textView) {
        if (StringUtil.isEmpty(textView.getText().toString())) {
            DialogHelp.showAlert(context, msg);
            return false;
        }
        return true;
    } public static boolean checkEditText(Context context, String msg, AutoCompleteTextView textView) {
        if (StringUtil.isEmpty(textView.getText().toString())) {
            DialogHelp.showAlert(context, msg);
            return false;
        }
        return true;
    }
}
